Skip to content

[fix][test] AdvertisedListenersTest.setup - #17869

Merged
codelipenghui merged 2 commits into
apache:masterfrom
congbobo184:congbobo184_fix_AdvertisedListenersTest
Oct 17, 2022
Merged

[fix][test] AdvertisedListenersTest.setup#17869
codelipenghui merged 2 commits into
apache:masterfrom
congbobo184:congbobo184_fix_AdvertisedListenersTest

Conversation

@congbobo184

@congbobo184 congbobo184 commented Sep 28, 2022

Copy link
Copy Markdown
Contributor

Fixes: #16544

Motivation

now in tests, we getFreePort not occupied, just written in configuration, so it may be created repeatedly. If the socket port is repeatedly, the test will become flaky.

Modifications

when we getFreePort, the port will be occupied and then if you use finished can release this port.

Documentation

  • doc-not-needed

Matching PR in the forked repository

PR in forked repository:

@congbobo184 congbobo184 added type/flaky-tests doc-not-needed Your PR changes do not impact docs labels Sep 28, 2022
@congbobo184 congbobo184 added this to the 2.11.0 milestone Sep 28, 2022
@congbobo184 congbobo184 self-assigned this Sep 28, 2022
@congbobo184 congbobo184 changed the title [fix][flaky-test] BookKeeperClusterTestCase.setup() [fix][flaky-test] AdvertisedListenersTest.setup Sep 28, 2022

@poorbarcode poorbarcode left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work

@codecov-commenter

codecov-commenter commented Oct 13, 2022

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (master@7e4c746). Learn more about missing BASE report.

Files with missing lines Patch % Lines
...ava/org/apache/pulsar/common/util/PortManager.java 60.00% 5 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #17869   +/-   ##
=========================================
  Coverage          ?   45.76%           
  Complexity        ?    17549           
=========================================
  Files             ?     1574           
  Lines             ?   128224           
  Branches          ?    14100           
=========================================
  Hits              ?    58678           
  Misses            ?    63492           
  Partials          ?     6054           
Flag Coverage Δ
unittests 45.76% <60.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ava/org/apache/pulsar/common/util/PortManager.java 60.00% <60.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codelipenghui codelipenghui changed the title [fix][flaky-test] AdvertisedListenersTest.setup [fix][test] AdvertisedListenersTest.setup Oct 14, 2022
@codelipenghui
codelipenghui merged commit b530184 into apache:master Oct 17, 2022
@shibd shibd modified the milestones: 2.11.0, 3.0.0 Oct 22, 2023
shibd pushed a commit to shibd/pulsar that referenced this pull request Oct 22, 2023
shibd pushed a commit to shibd/pulsar that referenced this pull request Oct 23, 2023
shibd pushed a commit to shibd/pulsar that referenced this pull request Oct 23, 2023
shibd pushed a commit to shibd/pulsar that referenced this pull request Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky-test: AdvertisedListenersTest.setup

5 participants